﻿/*----------------------------------------------------------------
// Copyright (C) 2005 麦迪斯顿(北京)医疗科技发展有限公司
// 文件名：ColumnNameAttribute.cs
// 文件功能描述：ColumnNameAttribute
// 创建标识：顾伟伟-2011-01-14
----------------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace Medicalsystem.Docare.Common.Mapping
{
    /// <summary>
    /// 标识为数据字段
    /// </summary>
    [AttributeUsage(AttributeTargets.Property)]
    public class DataFieldAttribute : Attribute
    {
        private bool _isKey = false;

        public bool PrimaryKey
        {
            get
            {
                return _isKey;
            }
            set
            {
                _isKey = value;
            }
        }

        private string _columnName = string.Empty;

        public string ColumnName
        {
            get
            {
                return _columnName;
            }
            set
            {
                _columnName = value;
            }
        }

        private DbType _type = DbType.String;

        public DbType DbType
        {
            get
            {
                return _type;
            }
            set
            {
                _type = value;
            }
        }
    }
}
